# coding: utf-8
from datetime import datetime
from sqlalchemy import Column, String, DATETIME, text, func
from sqlalchemy.dialects.mysql import INTEGER, TINYINT
from ..database import db,serialize


class Config(db.Model):
    __tablename__ = 'config'

    id = Column(INTEGER(10), primary_key=True)
    sitename = Column(String(200, 'utf8mb4_unicode_ci'), comment='站点名称')
    describe = Column(String(500, 'utf8mb4_unicode_ci'), comment='描述')
    person = Column(String(100, 'utf8mb4_unicode_ci'), comment='联系人')
    phone = Column(String(200, 'utf8mb4_unicode_ci'), comment='联系电话')
    email = Column(String(200, 'utf8mb4_unicode_ci'), comment='邮箱')
    address = Column(String(500, 'utf8mb4_unicode_ci'), comment='地址')
    created_at = Column(DATETIME, default=datetime.now())
    updated_at = Column(DATETIME, default=datetime.now(
    ), server_default=func.now(), onupdate=func.now(), comment='修改时间')

